Skip to content

fix(lefthook): exclude docs/** from the format pre-commit job - #135

Merged
V3RON merged 1 commit into
mainfrom
fix/lefthook-format-docs-only
Sep 9, 2026
Merged

V3RON merged 1 commit into
mainfrom
fix/lefthook-format-docs-only

Conversation

@V3RON

@V3RON V3RON commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The format pre-commit job's glob still matched docs/**, but .oxfmtrc.json ignores that path — so a docs-only staged commit left oxfmt with zero targets and it exited 2, rejecting the commit.
  • Added exclude: "docs/**" to the format job to keep lefthook and oxfmt's ignore rules in sync.

Closes #126

Test plan

  • Staged a docs-only change and ran lefthook run pre-commit --command format: job reports (skip) no files for inspection, exit 0.
  • Confirmed the format job still runs and passes on non-docs staged files.

.oxfmtrc.json already ignores docs/**, so a docs-only staged commit
left oxfmt with zero targets after its own filtering and it exited 2.
Excluding docs/** from the format job's glob keeps lefthook and
oxfmt in sync and skips the job cleanly on docs-only commits.

Closes #126
@V3RON
V3RON merged commit e446278 into main Sep 9, 2026
5 checks passed
@V3RON
V3RON deleted the fix/lefthook-format-docs-only branch September 9, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lefthook: the format pre-commit job fails on docs-only commits

1 participant